package com.jun.feign.service.impl;

import com.jun.feign.entity.User;
import com.jun.feign.service.HelloService;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.RequestParam;


/**
 * 描述:
 *
 * @outhor jun
 * @create 2018-04-28 14:23
 */
@Component
public class HelloServiceFallback implements HelloService {

    @Override
    public String hello() {
        return "error";
    }

    @Override
    public String hello(@RequestParam("name") String name) {
        return "error";
    }

    @Override
    public User hello(@RequestHeader("name") String name , @RequestHeader("age") Integer age) {
        return new User("unknown" , 0);
    }

    @Override
    public String hello(@RequestBody User user) {
        return "error";
    }
}
